 var moment=require('moment');
 const os=require('os')//操作系统主机名
 const path=require('path')
 const {URL}=require('url')
 const {name,fun}=require('./common.js')//导入模块
 console.log(name)
 fun()
 const address='https://momentjs.com/docs/displaying?name=zs'
// const name="lisi"
const obj=new URL(address)
console.log(obj.searchParams.get('name'))
console.log(os.platform())
console.log(path.join('tmp',"username"))
console.log(path.join(__dirname,"username"))//拼接路径
console.log(path.resolve('user','name','mark'))//将相对路径转换为绝对路径
console.log(name)
console.log(moment())
console.log(moment().format())
console.log(moment().format('YYY-MM-DD'))
